<template>
  <el-dialog
    top="30px"
    width="1000px"
    append-to-body
    :close-on-click-modal="false"
    :before-close="beforeClose"
    :visible.sync="visible"
  >
    <investigate-approve
      :query-id="queryId"
      v-if="+processStatus === 0"
      @success="handleSuccess"
    ></investigate-approve>
    <!-- 权限外 -->
    <investigate-out-approve
      v-if="+processStatus === 1"
      :query-id="queryId"
      @success="handleSuccess"
    ></investigate-out-approve>
  </el-dialog>
</template>

<script>
import InvestigateApprove from '@/credit/views/province/mission/components/InvestigateApprove'
import InvestigateOutApprove from '@/credit/views/province/mission/components/InvestigateOutApprove'
export default {
  props: {
    visible: Boolean,
    queryId: String,
    processStatus: {
      type: String,
      default: '0',
    },
  },
  components: {
    InvestigateApprove,
    InvestigateOutApprove,
  },
  data() {
    return {}
  },

  created() {},
  methods: {
    beforeClose() {
      this.$emit('update:visible', false)
    },
    handleSuccess() {
      this.$emit('success', true)
      this.beforeClose()
    },
  },
}
</script>
<style lang="scss" scoped></style>
